FrameElement

public interface FrameElement implements Element

An HTML DOM frame or iframe element.

Functions

Link copied to clipboard
public abstract void addEventListener(EventType eventType, Observer<Event> listener, boolean useCapture)
Adds the given listener to the event target.
Link copied to clipboard
public abstract boolean appendChild(Node childNode)
Adds the given node as a child of the current node to the end of its children list.
Link copied to clipboard
public abstract ElementAttributes attributes()
Returns HTML attributes of this element.
Link copied to clipboard
public abstract void blur()
Removes keyboard focus from the current element.
Link copied to clipboard
public abstract Rect boundingClientRect()
Returns the rectangle bounds of the element and its position relative to the top-left of the viewport of the current document.
Link copied to clipboard
public abstract List<Node> children()
Returns an immutable list of all children of this node.
Link copied to clipboard
public abstract void click()
Simulates a click on the node.
Link copied to clipboard
public abstract void close()
Closes this node.
Link copied to clipboard
public abstract Set<DocumentPosition> compareDocumentPosition(Node otherNode)
Compares position of the current node against another node in a DOM tree.
Link copied to clipboard
public abstract Optional<Document> contentDocument()
Returns an Optional that contains the document of the current FRAME/IFRAME element if it exists, otherwise an empty Optional.
Link copied to clipboard
public abstract boolean dispatch(Event event)
Dispatches the given event at the current event target.
Link copied to clipboard
public abstract Document document()
Returns the Document instance of this node.
Link copied to clipboard
public abstract XPathResult evaluate(String expression)
Evaluates the given XPath expression for the node and returns the XPathResult of the ANY type.
public abstract XPathResult evaluate(String expression, XPathResultType type)
Evaluates the given XPath expression for the node and returns the XPathResult object of the given type.
Link copied to clipboard
public abstract List<Observer<Event>> eventListeners(EventType eventType, boolean useCapture)
Returns the immutable list of event listeners that listen events of the given eventType in a phase that corresponds the given useCapture.
Link copied to clipboard
public abstract Optional<Element> findElementByClassName(String className)
Returns the first Element object found in the current search context by the given className.
Link copied to clipboard
public abstract Optional<Element> findElementByCssSelector(String cssSelector)
Returns the first Element object found in the current search context by the given cssSelector.
Link copied to clipboard
public abstract Optional<Element> findElementById(String id)
Returns the first Element object found in the current search context by the given id.
Link copied to clipboard
public abstract Optional<Element> findElementByName(String name)
Returns the first Element object found in the current search context by the given name.
Link copied to clipboard
public abstract Optional<Element> findElementByTagName(String tagName)
Returns the first Element object found in the current search context by the given tagName.
Link copied to clipboard
public abstract List<Element> findElementsByClassName(String className)
Returns an immutable list of the Element objects found in the current search context by the given className.
Link copied to clipboard
public abstract List<Element> findElementsByCssSelector(String cssSelector)
Returns an immutable list of the Element objects found in the current search context by the given cssSelector.
Link copied to clipboard
public abstract List<Element> findElementsById(String id)
Returns an immutable list of the Element objects found in the current search context by the given id.
Link copied to clipboard
public abstract List<Element> findElementsByName(String name)
Returns an immutable list of the Element objects found in the current search context by the given name.
Link copied to clipboard
public abstract List<Element> findElementsByTagName(String tagName)
Returns an immutable list of the Element objects found in the current search context by the given tagName.
Link copied to clipboard
public abstract void focus()
Sets focus on this element, if it can be focused.
Link copied to clipboard
public abstract String innerHtml()
Returns a string with the HTML content of this element, or an empty string if the element does not have inner HTML.
public abstract boolean innerHtml(String html)
Replaces the HTML content of this element with the given html.
Link copied to clipboard
public abstract String innerText()
Returns a string with the text content of the element and its descendants.
public abstract boolean innerText(String innerText)
Replaces the text content of the element with the given innerText value.
Link copied to clipboard
public abstract boolean insertChild(Node node, Node beforeNode)
Inserts the given node before the given beforeNode as a child of the current node.
Link copied to clipboard
public abstract Optional<Node> nextSibling()
Returns an Optional that contains the next node in the document tree if such a node exists, otherwise returns an empty Optional.
Link copied to clipboard
public abstract String nodeName()
Returns a string that represents the node name in the UTF8 format.
Link copied to clipboard
public abstract String nodeValue()
Returns a string that represents the node value.
public abstract void nodeValue(String value)
Updates the node value with the given new value.
Link copied to clipboard
public abstract String outerHtml()
Returns a string with the HTML serialization of this element and its descendants.
public abstract boolean outerHtml(String html)
Replaces the element and all of its descendants with a new DOM tree constructed by parsing the given html.
Link copied to clipboard
public abstract Optional<Node> parent()
Returns an Optional that contains the parent of this node.
Link copied to clipboard
public abstract Optional<Node> previousSibling()
Returns an Optional that contains the previous node in the document tree if such a node exists, otherwise returns an empty Optional.
Link copied to clipboard
public abstract boolean removeChild(Node childNode)
Removes the given childNode of the current node from the DOM.
Link copied to clipboard
public abstract void removeEventListener(EventType eventType, Observer<Event> listener, boolean useCapture)
Removes the given listener from the event target.
Link copied to clipboard
public abstract boolean replaceChild(Node newNode, Node oldNode)
Replaces the given child oldNode of the current node with the given newNode.
Link copied to clipboard
public abstract void scrollIntoView(Element.AlignTo alignTo)
Scrolls the element's parent container such that the element on which this method is called is visible to the user.
Link copied to clipboard
public abstract String textContent()
Returns the text content of the current node and its descendants.
public abstract void textContent(String textContent)
Removes all the current node children and replaces them with a single text node with the given textContent.
Link copied to clipboard
public abstract NodeType type()
Returns the node type.
Link copied to clipboard
public abstract String xPath()
Returns a string that represents XPath to the current Node or an empty string if it is not available.